package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.AlarmLevelValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = AlarmLevelValidator.class)
public @interface ValidAlarmLevel {
    // 更新为数字范围
    String message() default "无效的报警等级，允许值：1(危急)/2(严重)/3(一般)/4(警告)/5(信息)";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}